package com.moli.iov.admin.model.vo.req;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * 企业管理VO
 * </p>
 *
 * @author zql
 * @since 2019/9/4 16:03
 */
@Data
public class CompanyVo extends BaseVo {

  /**
   * 企业id
   */
  @NotNull(message = "企业id不能为空", groups = {Update.class, Get.class})
  private Long companyId;

  /**
   * 企业名称
   */
  @NotBlank(message = "企业名称不能为空", groups = {Save.class})
  @Length(max = 100, message = "企业名称最大长度为100", groups = {Save.class})
  @Null(message = "不允许修改企业名称", groups = {Update.class})
  private String companyName;

  /**
   * 企业全称
   */
  @NotBlank(message = "企业全称不能为空", groups = {Save.class})
  @Length(max = 100, message = "企业全称最大长度为200", groups = {Save.class})
  @Null(message = "不允许修改企业全称", groups = {Update.class})
  private String companyFullName;

  /**
   * 省份编码
   */
  @NotBlank(message = "省份编码不能为空", groups = {Save.class, Update.class})
  private String provinceCode;

  /**
   * 省份名称
   */
  @NotBlank(message = "省份名称不能为空", groups = {Save.class, Update.class})
  private String provinceName;

  /**
   * 城市编码
   */
  @NotBlank(message = "城市编码不能为空", groups = {Save.class, Update.class})
  private String cityCode;

  /**
   * 城市名称
   */
  @NotBlank(message = "城市名称不能为空", groups = {Save.class, Update.class})
  private String cityName;

  /**
   * 详细地址
   */
  @NotBlank(message = "城市名称不能为空", groups = {Save.class, Update.class})
  @Length(max = 200, message = "详细地址最大长度为200", groups = {Save.class, Update.class})
  private String address;

  /**
   * 负责人姓名
   */
  @NotBlank(message = "负责人姓名不能为空", groups = {Save.class, Update.class})
  @Length(max = 200, message = "负责人姓名最大长度为50", groups = {Save.class, Update.class})
  private String corporationName;

  /**
   * 负责人手机
   */
  @NotBlank(message = "负责人手机不能为空", groups = {Save.class, Update.class})
  @Length(max = 200, message = "负责人手机最大长度为20", groups = {Save.class, Update.class})
  @Pattern(regexp = "^[1-9]\\d*|0$", message = "负责人手机只能为数字", groups = {Save.class, Update.class})
  private String corporationPhone;

  /**
   * 负责人邮箱
   */
  @NotBlank(message = "负责人邮箱不能为空", groups = {Save.class})
  @Length(max = 200, message = "负责人邮箱最大长度为255", groups = {Save.class})
  @Email(message = "负责人邮箱格式错误", groups = {Save.class})
  @Null(message = "不允许修改负责人邮箱", groups = {Update.class})
  private String email;

  /**
   * 状态:0、停用 1、启用
   */
  @NotNull(message = "状态不能为空", groups = {Save.class, Update.class})
  private Integer status;

  /**
   * 营业执照副本pdf url
   */
  private String businessLicensePdfUrl;

  /**
   * 营业执照副本pdf OSSKey
   */
  private String businessLicensePdfKey;

  /**
   * 营业执照副本pic url
   */
  private String businessLicensePicUrl;

  /**
   * 营业执照副本pic OSSKey
   */
  private String businessLicensePicKey;

  public interface Save{};

  public interface Update{};

  public interface Get{};

}
